[mirrors]
http://nmap.org/dist/nmap-6.40.tar.bz2

[main]
filesize=7871636
sha512=b0ccb7634838e814dc0e36a0dbfc8c74853ef9dc6a119b73ffc90caab8875cbae893e0d24371ea568f9fff969440ed2a2e89953a6dbb6eb26313a4ea25b02b3b

[deps]
libpcap
pcre
zlib
lua
openssl
gnu-getopt

[deps.host]
dynamic-toolchain

[build]
patch -p1 < "$K/nmap-configure-pcap_suitable.patch"
patch -p1 < "$K/nmap-nbase_h.patch"
patch -p1 < "$K"/nmap-ldflags.patch

GNU_GETOPT="-Dgetopt=gnu_getopt -Dgetopt_long=gnu_getopt_long -Dgetopt_long_only=gnu_getopt_long_only"
CFLAGS="-D_GNU_SOURCE -D_BSD_SOURCE $GNU_GETOPT $optcflags" \
CXXFLAGS="-DIPPROTO_MAX=256 $CFLAGS" \
LDFLAGS="$optldflags -lgnu_getopt" \
  ./configure -C --prefix="$butch_prefix" \
    --without-subversion --without-nmap-update --without-zenmap \
    --without-ndiff \
    ac_cv_working_getaddrinfo=yes ac_cv_working_getnameinfo=yes

make -j$MAKE_THREADS
make DESTDIR="$butch_install_dir" install STRIP=true
